package com.itheima.d08_extends_quickstart.父类;

/**
 * 狗类：狗的图纸/模板
 */
public class Dog {
    //1.构造方法：没有返回值+方法名称和类名一致
    //  特点：new + 构造方法，创建对象，会自动调用构造方法
    //  使用场景：创建对象时，对对象的属性进行初始化赋值操作
    public Dog(){
        System.out.println("构造方法执行了...");
    }

    //创建构造方法的快捷方式：alt+insert+constructor
    public Dog(int id, String name, int age, double weight, double height, String birthday,
                    char gender, String color, boolean isGood, double price, String address) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.weight = weight;
        this.height = height;
        this.birthday = birthday;
        this.gender = gender;
        this.color = color;
        this.isGood = isGood;
        this.price = price;
        this.address = address;
    }

    //2.成员变量/成员属性：存储的数据
    int id;
    String  name;
    int age;
    double weight;
    double height;
    String  birthday;
    char gender;
    String color;
    boolean isGood;
    double price;
    String address;



    //3.成员方法/成员行为：代表功能
    public void lookHome(){
        System.out.println("看家");
    }


}
